﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;

using UncleBobWebService.ServiceRequester;
using UncleBobWebService.Models;

namespace UncleBobWebService.Database
{
    abstract class IDBAdapter
    {
        //----------------------------------------------
        //----------------------------------------------
        protected static string mConnectionString = ConfigurationManager.ConnectionStrings["AESDBConnectionString"].ConnectionString;
        protected static SqlConnection mConnection = new SqlConnection(mConnectionString);
        protected SqlCommand mCommand;
        protected DataTable mTable;

        #region "Abstract Classes"
        //**************************************************
        //Create entry
        //**************************************************
        public abstract Message CreateData(Message msg, Object data);


        //**************************************************
        //Return all data in table
        //**************************************************
        public abstract Message SearchForSpecificData(Message msg, Object data);


        //**************************************************
        //Return specific data in table
        //**************************************************
        public abstract Message SearchForAllData(Message msg);


        //**************************************************
        //Edit specific entry in table
        //**************************************************
        public abstract Message EditSpecificData(Message msg, Object data);


        //**************************************************
        //Delete specific entry
        //**************************************************
        public abstract Message DeleteSpecificData(Message msg, Object data);


        //**************************************************
        //Delete all entry
        //**************************************************
        public abstract Message DeleteAllData(Message msg);
        #endregion            
    }
}
